<h1>Listing images</h1>

<table>
  <tr>
    <th>Picture</th>
  </tr>
  
<% for image in @images %>
  <tr>
    <td><%=h image.file %></td>
    <td><%= link_to 'Show', :action => 'show', :id => image %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => image }, 
    				:confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @image_pages.current.previous } if @image_pages.current.previous %>
<%= link_to 'Next page', { :page => @image_pages.current.next } if @image_pages.current.next %> 

<br />

<%= link_to 'New image', :action => 'new' %>
